<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Home</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="stylesheet" href="/docs/css/layui.css"
        " media="all">
        <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    </head>
    <body>

        <table class="layui-hide" id="docsList"></table>
        <script src="/docs/layui.js" charset="utf-8"></script>
        <script type="text/html" id="projectTpl">
            <a href="/docs/view/{{ d.projectId }}/index.html" class="layui-table-link" target="_blank">{{ d.projectId }}</a>
        </script>
        <script>
            layui.use('table', function () {
                var table = layui.table;
                table.render({
                    elem: '#docsList'
                    , url: '/view/docs/docsList'
                    , cellMinWidth: 80
                    , cols: [[
                        {field: 'projectId', width: '40%', title: 'ID', templet: '#projectTpl'}
                        ,{field: 'lastUpdateTime', width: '40%', title: '最新更新时间'}
                    ]]
                    , parseData: function (data) {
                        return {"code": 0, "data": data}
                    }
                });
            })
            ;
        </script>

    </body>
</html>